<%@ page language="java" contentType="text/html; charset=utf-8" pageEncoding="utf-8" %>
<%@ taglib prefix="spring" uri="http://www.springframework.org/tags" %>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%>

<%@ page isELIgnored="false" %> 
<%
String path = request.getContextPath();
String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/";
%>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html>
	<head>
	     <meta name="baidu-site-verification" content="pddNQTtRaz" />
	     <title>一个年过半甲的老码农</title>
	     <meta name="keywords" content="${_keyword }" />
	     <meta name="description" content="${_description }" />
	     <meta name="google-site-verification" content="4KoG3qDFYrcjGGEbctZBtdsYSaYkidHuS2hxCj-iWZg" />
	     <meta name="viewport" content="width=device-width, initial-scale=1.0" />
	     <link href="/static/css/base.css" rel="stylesheet" />
	     <link href="/static/css/index.css" rel="stylesheet" />
	     <link href="/static/css/m.css" rel="stylesheet" />
	     <script src="/static/plugin/jquery.min.js"></script>
	     <script src="/static/js/swiper/swiper.min.js"></script>
	     <link href="/static/css/swiper.min.css" rel="stylesheet" />
	     
	     <link rel="icon" href="/static/img/logo.ico" type="image/x-icon" />
	     
	     <script type="text/javascript">
	     var _width = 0;
	     var _height = 0;
	     $(function() {
	    	 _width = $(window).width();
	    	 _height = $(window).height();
	    	 var input = $('#inputDiv_input');
	    	 var inputDiv = $('#inputDiv');
	    	 input.focus();
	    	 inputDiv.css({
	    		 'margin-top' : (_height - 470) / 2 + 'px'
	    	 });

	    	 input.keyup(function(e) {
                if(e.keyCode == 13) {
                    $('#keywordMid').val(input.val());
                    $('#searchformMid').submit();
                }
            });
	    	
	    	 initHotTags(_hotTags);
	     });
	     
	     //"Java,搜索引擎,Solr,参数同步,SpringBoot,JVM,Docker"
	     var _hotTags = [
	    	 { text : "Java", href : '/list?tag=Java' },
	    	 { text : "《从零学搜索引擎-Solr》", href : '/album?id=4b240523f9ae459c80ba011d9046e5bf' },
	    	 { text : "Solr", href : '/list?keyword=solr&pageNo=1&tag=&categoryId=&pageSize=15' },
	    	 { text : "《参数同步框架》", href : '/album?id=584c734720094ced880224c8e0cd4572' },
	    	 { text : "SpringBoot", href : '/list?tag=SpringBoot' },
	    	 { text : "JVM", href : '/list?tag=JVM' },
	    	 { text : "Docker", href : '/list?tag=Docker' },
	    	 { text : "《应用算法学习》", href : '/album?id=b4546d0cb105469c9e79f71c01c7cfc2' },
	     ];
	     function initHotTags(tagList) {
	    	 if(!tagList || tagList.length < 2) {
	    		 return ;
	    	 }
	    	 var obj = $('#hotTagDiv');
	    	 var h = '';
	    	 for(var i in tagList) {
	    		 var tag = tagList[i];
	    		 h += '<a href="' + tag.href + '">' + tag.text + '</a>';
	    	 }
	    	 obj.html(h);
	     }
	     
	     </script>
	     
	     <style type="text/css" >
	     #inputDiv{
	           margin : 40px auto;
	           text-align : center;
	     }
	     #inputDiv_input{
	          line-height : 35px;
	          padding : 8px 12px 6px 15px;
	          width : 600px;
	          background: rgba(246, 246, 246, 1);
	          border: 0;
	          box-shadow : 0px 0px 2px #999999;
	          outline : none;
	          border-radius : 2px;
	          font-size : 15px;
	     }
	     a.top-a{
	       font-size : 14px;
	       text-decoration : underline;
	       margin-right : 20px;
	     }
	     
	     #hotTagDiv{
	       margin : 30px auto;
	       text-align : center;
	     }
	     #hotTagDiv > a {
	       font-size : 13px;
	       text-decoration : underline;
	       margin-right : 8px;
	       margin-left : 8px;
	       color : #999999;
	     }
         #hotTagDiv > a:hover {
           color : black;
         }
	     </style>
	</head>
	
	<body>
	    <div style="positoin : fixed; top : 0; text-align : right; padding : 10px 20px 1px 1px;">
	       <a class="top-a" href="/home">首页</a>
	       <a class="top-a" href="/list">文章列表</a>
	       <a class="top-a" target="_blank" href="/about">关于作者</a>
	    </div>
	
	    <div>
	    
	       <div id="inputDiv" >
	            <div style="width : 337px; margin : 1px auto 40px auto;">
	               <img src="/static/img/logo_nav.png" width="337" height="75" />
	            </div>
	            <div>
		            <form action="list" method="get" name="searchform" id="searchformMid">
	                    <input name="keyword" id="keywordMid" value="" type="hidden" />
	                    <input name="pageNo" value="1" type="hidden">
	                    <input name="pageSize" value="<c:out value="${query.pageSize }">20</c:out>" type="hidden">
	                    <input id="inputDiv_input" autocomplete="off" type="input" placeholder="想看什么？搜索引擎 / Java / Solr" value="" />
	               </form>
	            </div>
                <div id="hotTagDiv">
                
                </div>
	       </div>
	    </div>
	    
	    <footer style="position : fixed; bottom : 0; font-size : 14px;">
		    <p>
		        Design by <a href="/home">wjyuian</a> <span style="padding-left : 30px;">沪ICP备18034352号</span>
		    </p>
	    </footer>
	</body>
</html>

